#!/usr/bin/env python
# -*- coding: UTF-8 -*-
'''
@File    ：data_content.py
@IDE     ：PyCharm 
@Author  ：lmy
@Date    ：2024/7/24 17:38 
'''
from pathlib import Path
import os
import json


class CONTENT:
    def __init__(self):
        # 时间窗口
        self.WINDOW_LST = ['d1od1', 'd7od7', 'd15od15', 'm1om1', 'm3om3', 'm6om6']
        self.TIME_INTERVALS = [3, 7, 15, 30, 90, 180, 'all']
        self.WEEK_TYPES = ['weekday', 'weekend']
        self.TIME_AGG_TYPES = ['time_day', 'week', 'month']
        self.TIME_PERIODS = [(0, 5, 'early_morning'), (6, 10, 'morning'), (11, 13, 'noon'), (14, 17, 'afternoon'),
                             (18, 23, 'night')]  # 定义时间段

        self.FEA_LST = ['body', 'body_pre', 'sender', 'word']
        self.SE_TYPE = ['es', 'as', 'ae']
        self.READ_TYPE = ['0', '1']
        self.SMS_TYPE = {'1': 'rece', '2': 'send'}
        self.OVERDUE_LST = ['overdue_days', 'overdue_amt', 'repay_amt']

        # 西语停用词
        root_path = Path(__file__).parent.parent.parent.parent / 'feature_conf' / 'sms' / 'un'
        with open(os.path.join(root_path, 'stopword_es.json'), 'r', encoding='utf-8') as file:
            self.STOPWORD_ES = json.load(file)

        # 泰语停用词
        with open(os.path.join(root_path, 'stopword_th.json'), 'r', encoding='utf-8') as file:
            self.STOPWORD_TH = json.load(file)

        # 印尼停用词
        with open(os.path.join(root_path, 'stopword_id.json'), 'r', encoding='utf-8') as file:
            self.STOPWORD_ID = json.load(file)

        # 坦桑停用词
        with open(os.path.join(root_path, 'stopword_sw.json'), 'r', encoding='utf-8') as file:
            self.STOPWORD_SW = json.load(file)
